<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-cpp">#if __GLASGOW_HASKELL__ &gt;= 709
</span><span class="hs-pragma">{-# LANGUAGE Safe #-}</span><span class="hs-cpp">
#else
</span><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span class="hs-cpp">
#endif
</span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Module      :  Graphics.Win32.GDI.HDC</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Copyright   :  (c) Alastair Reid, 1997-2003</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- License     :  BSD-style (see the file libraries/base/LICENSE)</span><span>
</span><span id="line-11"></span><span class="hs-comment">--</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Maintainer  :  Esa Ilari Vuokko &lt;ei@vuokko.info&gt;</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Stability   :  provisional</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-15"></span><span class="hs-comment">--</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- A collection of FFI declarations for interfacing with Win32.</span><span>
</span><span id="line-17"></span><span class="hs-comment">--</span><span>
</span><span id="line-18"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-19"></span><span>
</span><span id="line-20"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Graphics.Win32.GDI.HDC</span><span>
</span><span id="line-21"></span><span>        </span><span class="hs-special">(</span><span> </span><span class="hs-keyword">module</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html"><span class="hs-identifier">Graphics.Win32.GDI.HDC</span></a></span><span>
</span><span id="line-22"></span><span>        </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="System.Win32.Types.html"><span class="hs-identifier">System.Win32.Types</span></a></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html"><span class="hs-identifier">Graphics.Win32.GDI.Types</span></a></span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Foreign.html#"><span class="hs-identifier">Foreign</span></a></span><span class="hs-cpp">

#include &quot;windows_cconv.h&quot;
</span><span>
</span><span id="line-31"></span><span class="hs-comment">{- Note [Overflow checking and fromIntegral]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Some windows APIs use the value 0x80000000 to represent failure return
codes. However, when GHC builds libraries with -XNegativeLiterals
enabled, it will fail in contexts where the type would suffer from
signed overflow - such as Int32. (minBound :: Int32 == 0x80000000)

Technically, the frontend is correct that the literal overflows in the
context it is used in. So instead, we use fromIntegral to convert the
literal from a Word32 to the necessary type. This isn't any less
efficient (fromIntegral is optimized away,) and conveys the idea we
simply want the same representational value.
-}</span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span class="hs-comment">----------------------</span><span>
</span><span id="line-47"></span><span class="hs-comment">-- Implement GetPixel</span><span>
</span><span id="line-48"></span><span class="hs-comment">----------------------</span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getPixel"><span class="hs-identifier hs-type">getPixel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#COLORREF"><span class="hs-identifier hs-type">COLORREF</span></a></span><span>
</span><span id="line-51"></span><span id="getPixel"><span class="annot"><span class="annottext">getPixel :: HDC -&gt; Int -&gt; Int -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#getPixel"><span class="hs-identifier hs-var hs-var">getPixel</span></a></span></span><span> </span><span id="local-6989586621679109653"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109653"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109652"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109652"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679109651"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109651"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HDC -&gt; Int -&gt; Int -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetPixel"><span class="hs-identifier hs-var">c_GetPixel</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109653"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109652"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109651"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetPixel&quot;</span><span>
</span><span id="line-53"></span><span>  </span><span id="c_GetPixel"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetPixel"><span class="hs-identifier hs-var">c_GetPixel</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#COLORREF"><span class="hs-identifier hs-type">COLORREF</span></a></span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span class="hs-comment">----------------------</span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#setArcDirection"><span class="hs-identifier hs-type">setArcDirection</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#ArcDirection"><span class="hs-identifier hs-type">ArcDirection</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#ArcDirection"><span class="hs-identifier hs-type">ArcDirection</span></a></span><span>
</span><span id="line-58"></span><span id="setArcDirection"><span class="annot"><span class="annottext">setArcDirection :: HDC -&gt; RegionType -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#setArcDirection"><span class="hs-identifier hs-var hs-var">setArcDirection</span></a></span></span><span> </span><span id="local-6989586621679109647"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109647"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109646"><span class="annot"><span class="annottext">RegionType
</span><a href="#local-6989586621679109646"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-59"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO RegionType -&gt; IO RegionType
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SetArcDirection&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO RegionType -&gt; IO RegionType) -&gt; IO RegionType -&gt; IO RegionType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; RegionType -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#c_SetArcDirection"><span class="hs-identifier hs-var">c_SetArcDirection</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109647"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">RegionType
</span><a href="#local-6989586621679109646"><span class="hs-identifier hs-var">dir</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SetArcDirection&quot;</span><span>
</span><span id="line-61"></span><span>  </span><span id="c_SetArcDirection"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SetArcDirection"><span class="hs-identifier hs-var">c_SetArcDirection</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#ArcDirection"><span class="hs-identifier hs-type">ArcDirection</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#ArcDirection"><span class="hs-identifier hs-type">ArcDirection</span></a></span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getArcDirection"><span class="hs-identifier hs-type">getArcDirection</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#ArcDirection"><span class="hs-identifier hs-type">ArcDirection</span></a></span><span>
</span><span id="line-64"></span><span id="getArcDirection"><span class="annot"><span class="annottext">getArcDirection :: HDC -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#getArcDirection"><span class="hs-identifier hs-var hs-var">getArcDirection</span></a></span></span><span> </span><span id="local-6989586621679109642"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109642"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-65"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO RegionType -&gt; IO RegionType
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetArcDirection&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO RegionType -&gt; IO RegionType) -&gt; IO RegionType -&gt; IO RegionType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetArcDirection"><span class="hs-identifier hs-var">c_GetArcDirection</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109642"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-66"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetArcDirection&quot;</span><span>
</span><span id="line-67"></span><span>  </span><span id="c_GetArcDirection"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetArcDirection"><span class="hs-identifier hs-var">c_GetArcDirection</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#ArcDirection"><span class="hs-identifier hs-type">ArcDirection</span></a></span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#setPolyFillMode"><span class="hs-identifier hs-type">setPolyFillMode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#PolyFillMode"><span class="hs-identifier hs-type">PolyFillMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#PolyFillMode"><span class="hs-identifier hs-type">PolyFillMode</span></a></span><span>
</span><span id="line-70"></span><span id="setPolyFillMode"><span class="annot"><span class="annottext">setPolyFillMode :: HDC -&gt; RegionType -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#setPolyFillMode"><span class="hs-identifier hs-var hs-var">setPolyFillMode</span></a></span></span><span> </span><span id="local-6989586621679109638"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109638"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109637"><span class="annot"><span class="annottext">RegionType
</span><a href="#local-6989586621679109637"><span class="hs-identifier hs-var">mode</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-71"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO RegionType -&gt; IO RegionType
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SetPolyFillMode&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO RegionType -&gt; IO RegionType) -&gt; IO RegionType -&gt; IO RegionType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; RegionType -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#c_SetPolyFillMode"><span class="hs-identifier hs-var">c_SetPolyFillMode</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109638"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">RegionType
</span><a href="#local-6989586621679109637"><span class="hs-identifier hs-var">mode</span></a></span><span>
</span><span id="line-72"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SetPolyFillMode&quot;</span><span>
</span><span id="line-73"></span><span>  </span><span id="c_SetPolyFillMode"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SetPolyFillMode"><span class="hs-identifier hs-var">c_SetPolyFillMode</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#PolyFillMode"><span class="hs-identifier hs-type">PolyFillMode</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#PolyFillMode"><span class="hs-identifier hs-type">PolyFillMode</span></a></span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getPolyFillMode"><span class="hs-identifier hs-type">getPolyFillMode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#PolyFillMode"><span class="hs-identifier hs-type">PolyFillMode</span></a></span><span>
</span><span id="line-76"></span><span id="getPolyFillMode"><span class="annot"><span class="annottext">getPolyFillMode :: HDC -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#getPolyFillMode"><span class="hs-identifier hs-var hs-var">getPolyFillMode</span></a></span></span><span> </span><span id="local-6989586621679109634"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109634"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-77"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO RegionType -&gt; IO RegionType
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetPolyFillMode&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO RegionType -&gt; IO RegionType) -&gt; IO RegionType -&gt; IO RegionType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetPolyFillMode"><span class="hs-identifier hs-var">c_GetPolyFillMode</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109634"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-78"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetPolyFillMode&quot;</span><span>
</span><span id="line-79"></span><span>  </span><span id="c_GetPolyFillMode"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetPolyFillMode"><span class="hs-identifier hs-var">c_GetPolyFillMode</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#PolyFillMode"><span class="hs-identifier hs-type">PolyFillMode</span></a></span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#setGraphicsMode"><span class="hs-identifier hs-type">setGraphicsMode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#GraphicsMode"><span class="hs-identifier hs-type">GraphicsMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#GraphicsMode"><span class="hs-identifier hs-type">GraphicsMode</span></a></span><span>
</span><span id="line-82"></span><span id="setGraphicsMode"><span class="annot"><span class="annottext">setGraphicsMode :: HDC -&gt; Word32 -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#setGraphicsMode"><span class="hs-identifier hs-var hs-var">setGraphicsMode</span></a></span></span><span> </span><span id="local-6989586621679109630"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109630"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109629"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679109629"><span class="hs-identifier hs-var">mode</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-83"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO Word32 -&gt; IO Word32
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SetGraphicsMode&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Word32 -&gt; IO Word32) -&gt; IO Word32 -&gt; IO Word32
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; Word32 -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#c_SetGraphicsMode"><span class="hs-identifier hs-var">c_SetGraphicsMode</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109630"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679109629"><span class="hs-identifier hs-var">mode</span></a></span><span>
</span><span id="line-84"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SetGraphicsMode&quot;</span><span>
</span><span id="line-85"></span><span>  </span><span id="c_SetGraphicsMode"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SetGraphicsMode"><span class="hs-identifier hs-var">c_SetGraphicsMode</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#GraphicsMode"><span class="hs-identifier hs-type">GraphicsMode</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#GraphicsMode"><span class="hs-identifier hs-type">GraphicsMode</span></a></span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getGraphicsMode"><span class="hs-identifier hs-type">getGraphicsMode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#GraphicsMode"><span class="hs-identifier hs-type">GraphicsMode</span></a></span><span>
</span><span id="line-88"></span><span id="getGraphicsMode"><span class="annot"><span class="annottext">getGraphicsMode :: HDC -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#getGraphicsMode"><span class="hs-identifier hs-var hs-var">getGraphicsMode</span></a></span></span><span> </span><span id="local-6989586621679109626"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109626"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-89"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO Word32 -&gt; IO Word32
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetGraphicsMode&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Word32 -&gt; IO Word32) -&gt; IO Word32 -&gt; IO Word32
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetGraphicsMode"><span class="hs-identifier hs-var">c_GetGraphicsMode</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109626"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-90"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetGraphicsMode&quot;</span><span>
</span><span id="line-91"></span><span>  </span><span id="c_GetGraphicsMode"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetGraphicsMode"><span class="hs-identifier hs-var">c_GetGraphicsMode</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#GraphicsMode"><span class="hs-identifier hs-type">GraphicsMode</span></a></span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#setStretchBltMode"><span class="hs-identifier hs-type">setStretchBltMode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#StretchBltMode"><span class="hs-identifier hs-type">StretchBltMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#StretchBltMode"><span class="hs-identifier hs-type">StretchBltMode</span></a></span><span>
</span><span id="line-94"></span><span id="setStretchBltMode"><span class="annot"><span class="annottext">setStretchBltMode :: HDC -&gt; RegionType -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#setStretchBltMode"><span class="hs-identifier hs-var hs-var">setStretchBltMode</span></a></span></span><span> </span><span id="local-6989586621679109622"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109622"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109621"><span class="annot"><span class="annottext">RegionType
</span><a href="#local-6989586621679109621"><span class="hs-identifier hs-var">mode</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-95"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO RegionType -&gt; IO RegionType
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SetStretchBltMode&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO RegionType -&gt; IO RegionType) -&gt; IO RegionType -&gt; IO RegionType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; RegionType -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#c_SetStretchBltMode"><span class="hs-identifier hs-var">c_SetStretchBltMode</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109622"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">RegionType
</span><a href="#local-6989586621679109621"><span class="hs-identifier hs-var">mode</span></a></span><span>
</span><span id="line-96"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SetStretchBltMode&quot;</span><span>
</span><span id="line-97"></span><span>  </span><span id="c_SetStretchBltMode"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SetStretchBltMode"><span class="hs-identifier hs-var">c_SetStretchBltMode</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#StretchBltMode"><span class="hs-identifier hs-type">StretchBltMode</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#StretchBltMode"><span class="hs-identifier hs-type">StretchBltMode</span></a></span><span>
</span><span id="line-98"></span><span>
</span><span id="line-99"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getStretchBltMode"><span class="hs-identifier hs-type">getStretchBltMode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#StretchBltMode"><span class="hs-identifier hs-type">StretchBltMode</span></a></span><span>
</span><span id="line-100"></span><span id="getStretchBltMode"><span class="annot"><span class="annottext">getStretchBltMode :: HDC -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#getStretchBltMode"><span class="hs-identifier hs-var hs-var">getStretchBltMode</span></a></span></span><span> </span><span id="local-6989586621679109618"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109618"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-101"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO RegionType -&gt; IO RegionType
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetStretchBltMode&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO RegionType -&gt; IO RegionType) -&gt; IO RegionType -&gt; IO RegionType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetStretchBltMode"><span class="hs-identifier hs-var">c_GetStretchBltMode</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109618"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-102"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetStretchBltMode&quot;</span><span>
</span><span id="line-103"></span><span>  </span><span id="c_GetStretchBltMode"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetStretchBltMode"><span class="hs-identifier hs-var">c_GetStretchBltMode</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#StretchBltMode"><span class="hs-identifier hs-type">StretchBltMode</span></a></span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#setBkColor"><span class="hs-identifier hs-type">setBkColor</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#COLORREF"><span class="hs-identifier hs-type">COLORREF</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#COLORREF"><span class="hs-identifier hs-type">COLORREF</span></a></span><span>
</span><span id="line-106"></span><span id="setBkColor"><span class="annot"><span class="annottext">setBkColor :: HDC -&gt; Word32 -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#setBkColor"><span class="hs-identifier hs-var hs-var">setBkColor</span></a></span></span><span> </span><span id="local-6989586621679109615"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109615"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109614"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679109614"><span class="hs-identifier hs-var">color</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-107"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO Word32 -&gt; IO Word32
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SetBkColor&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Word32 -&gt; IO Word32) -&gt; IO Word32 -&gt; IO Word32
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; Word32 -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#c_SetBkColor"><span class="hs-identifier hs-var">c_SetBkColor</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109615"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679109614"><span class="hs-identifier hs-var">color</span></a></span><span>
</span><span id="line-108"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SetBkColor&quot;</span><span>
</span><span id="line-109"></span><span>  </span><span id="c_SetBkColor"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SetBkColor"><span class="hs-identifier hs-var">c_SetBkColor</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#COLORREF"><span class="hs-identifier hs-type">COLORREF</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#COLORREF"><span class="hs-identifier hs-type">COLORREF</span></a></span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getBkColor"><span class="hs-identifier hs-type">getBkColor</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#COLORREF"><span class="hs-identifier hs-type">COLORREF</span></a></span><span>
</span><span id="line-112"></span><span id="getBkColor"><span class="annot"><span class="annottext">getBkColor :: HDC -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#getBkColor"><span class="hs-identifier hs-var hs-var">getBkColor</span></a></span></span><span> </span><span id="local-6989586621679109611"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109611"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-113"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO Word32 -&gt; IO Word32
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetBkColor&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Word32 -&gt; IO Word32) -&gt; IO Word32 -&gt; IO Word32
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetBkColor"><span class="hs-identifier hs-var">c_GetBkColor</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109611"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-114"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetBkColor&quot;</span><span>
</span><span id="line-115"></span><span>  </span><span id="c_GetBkColor"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetBkColor"><span class="hs-identifier hs-var">c_GetBkColor</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#COLORREF"><span class="hs-identifier hs-type">COLORREF</span></a></span><span>
</span><span id="line-116"></span><span>
</span><span id="line-117"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#setTextColor"><span class="hs-identifier hs-type">setTextColor</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#COLORREF"><span class="hs-identifier hs-type">COLORREF</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#COLORREF"><span class="hs-identifier hs-type">COLORREF</span></a></span><span>
</span><span id="line-118"></span><span id="setTextColor"><span class="annot"><span class="annottext">setTextColor :: HDC -&gt; Word32 -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#setTextColor"><span class="hs-identifier hs-var hs-var">setTextColor</span></a></span></span><span> </span><span id="local-6989586621679109608"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109608"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109607"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679109607"><span class="hs-identifier hs-var">color</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-119"></span><span>  </span><span class="annot"><span class="annottext">(Word32 -&gt; Bool) -&gt; String -&gt; IO Word32 -&gt; IO Word32
forall a. (a -&gt; Bool) -&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIf"><span class="hs-identifier hs-var">failIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="Graphics.Win32.GDI.Types.html#cLR_INVALID"><span class="hs-identifier hs-var">cLR_INVALID</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SetTextColor&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Word32 -&gt; IO Word32) -&gt; IO Word32 -&gt; IO Word32
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; Word32 -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#c_SetTextColor"><span class="hs-identifier hs-var">c_SetTextColor</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109608"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679109607"><span class="hs-identifier hs-var">color</span></a></span><span>
</span><span id="line-120"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SetTextColor&quot;</span><span>
</span><span id="line-121"></span><span>  </span><span id="c_SetTextColor"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SetTextColor"><span class="hs-identifier hs-var">c_SetTextColor</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#COLORREF"><span class="hs-identifier hs-type">COLORREF</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#COLORREF"><span class="hs-identifier hs-type">COLORREF</span></a></span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getTextColor"><span class="hs-identifier hs-type">getTextColor</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#COLORREF"><span class="hs-identifier hs-type">COLORREF</span></a></span><span>
</span><span id="line-124"></span><span id="getTextColor"><span class="annot"><span class="annottext">getTextColor :: HDC -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#getTextColor"><span class="hs-identifier hs-var hs-var">getTextColor</span></a></span></span><span> </span><span id="local-6989586621679109602"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109602"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-125"></span><span>  </span><span class="annot"><span class="annottext">(Word32 -&gt; Bool) -&gt; String -&gt; IO Word32 -&gt; IO Word32
forall a. (a -&gt; Bool) -&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIf"><span class="hs-identifier hs-var">failIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="Graphics.Win32.GDI.Types.html#cLR_INVALID"><span class="hs-identifier hs-var">cLR_INVALID</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetTextColor&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Word32 -&gt; IO Word32) -&gt; IO Word32 -&gt; IO Word32
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetTextColor"><span class="hs-identifier hs-var">c_GetTextColor</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109602"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-126"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetTextColor&quot;</span><span>
</span><span id="line-127"></span><span>  </span><span id="c_GetTextColor"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetTextColor"><span class="hs-identifier hs-var">c_GetTextColor</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#COLORREF"><span class="hs-identifier hs-type">COLORREF</span></a></span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#setBkMode"><span class="hs-identifier hs-type">setBkMode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#BackgroundMode"><span class="hs-identifier hs-type">BackgroundMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#BackgroundMode"><span class="hs-identifier hs-type">BackgroundMode</span></a></span><span>
</span><span id="line-130"></span><span id="setBkMode"><span class="annot"><span class="annottext">setBkMode :: HDC -&gt; RegionType -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#setBkMode"><span class="hs-identifier hs-var hs-var">setBkMode</span></a></span></span><span> </span><span id="local-6989586621679109598"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109598"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109597"><span class="annot"><span class="annottext">RegionType
</span><a href="#local-6989586621679109597"><span class="hs-identifier hs-var">mode</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-131"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO RegionType -&gt; IO RegionType
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SetBkMode&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO RegionType -&gt; IO RegionType) -&gt; IO RegionType -&gt; IO RegionType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; RegionType -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#c_SetBkMode"><span class="hs-identifier hs-var">c_SetBkMode</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109598"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">RegionType
</span><a href="#local-6989586621679109597"><span class="hs-identifier hs-var">mode</span></a></span><span>
</span><span id="line-132"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SetBkMode&quot;</span><span>
</span><span id="line-133"></span><span>  </span><span id="c_SetBkMode"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SetBkMode"><span class="hs-identifier hs-var">c_SetBkMode</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#BackgroundMode"><span class="hs-identifier hs-type">BackgroundMode</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#BackgroundMode"><span class="hs-identifier hs-type">BackgroundMode</span></a></span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getBkMode"><span class="hs-identifier hs-type">getBkMode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#BackgroundMode"><span class="hs-identifier hs-type">BackgroundMode</span></a></span><span>
</span><span id="line-136"></span><span id="getBkMode"><span class="annot"><span class="annottext">getBkMode :: HDC -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#getBkMode"><span class="hs-identifier hs-var hs-var">getBkMode</span></a></span></span><span> </span><span id="local-6989586621679109594"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109594"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-137"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO RegionType -&gt; IO RegionType
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetBkMode&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO RegionType -&gt; IO RegionType) -&gt; IO RegionType -&gt; IO RegionType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetBkMode"><span class="hs-identifier hs-var">c_GetBkMode</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109594"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-138"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetBkMode&quot;</span><span>
</span><span id="line-139"></span><span>  </span><span id="c_GetBkMode"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetBkMode"><span class="hs-identifier hs-var">c_GetBkMode</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#BackgroundMode"><span class="hs-identifier hs-type">BackgroundMode</span></a></span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#setBrushOrgEx"><span class="hs-identifier hs-type">setBrushOrgEx</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#POINT"><span class="hs-identifier hs-type">POINT</span></a></span><span>
</span><span id="line-142"></span><span id="setBrushOrgEx"><span class="annot"><span class="annottext">setBrushOrgEx :: HDC -&gt; Int -&gt; Int -&gt; IO POINT
</span><a href="Graphics.Win32.GDI.HDC.html#setBrushOrgEx"><span class="hs-identifier hs-var hs-var">setBrushOrgEx</span></a></span></span><span> </span><span id="local-6989586621679109591"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109591"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109590"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109590"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679109589"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109589"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-143"></span><span>  </span><span class="annot"><span class="annottext">(Ptr POINT -&gt; IO POINT) -&gt; IO POINT
forall a. (Ptr POINT -&gt; IO a) -&gt; IO a
</span><a href="Graphics.Win32.GDI.Types.html#allocaPOINT"><span class="hs-identifier hs-var">allocaPOINT</span></a></span><span> </span><span class="annot"><span class="annottext">((Ptr POINT -&gt; IO POINT) -&gt; IO POINT)
-&gt; (Ptr POINT -&gt; IO POINT) -&gt; IO POINT
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679109587"><span class="annot"><span class="annottext">Ptr POINT
</span><a href="#local-6989586621679109587"><span class="hs-identifier hs-var">pt</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-144"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO Bool -&gt; IO ()
</span><a href="System.Win32.Types.html#failIfFalse_"><span class="hs-identifier hs-var">failIfFalse_</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SetBrushOrgEx&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Bool -&gt; IO ()) -&gt; IO Bool -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; Int -&gt; Int -&gt; Ptr POINT -&gt; IO Bool
</span><a href="Graphics.Win32.GDI.HDC.html#c_SetBrushOrgEx"><span class="hs-identifier hs-var">c_SetBrushOrgEx</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109591"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109590"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109589"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr POINT
</span><a href="#local-6989586621679109587"><span class="hs-identifier hs-var">pt</span></a></span><span>
</span><span id="line-145"></span><span>  </span><span class="annot"><span class="annottext">Ptr POINT -&gt; IO POINT
</span><a href="Graphics.Win32.GDI.Types.html#peekPOINT"><span class="hs-identifier hs-var">peekPOINT</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr POINT
</span><a href="#local-6989586621679109587"><span class="hs-identifier hs-var">pt</span></a></span><span>
</span><span id="line-146"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SetBrushOrgEx&quot;</span><span>
</span><span id="line-147"></span><span>  </span><span id="c_SetBrushOrgEx"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SetBrushOrgEx"><span class="hs-identifier hs-var">c_SetBrushOrgEx</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#POINT"><span class="hs-identifier hs-type">POINT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getBrushOrgEx"><span class="hs-identifier hs-type">getBrushOrgEx</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#POINT"><span class="hs-identifier hs-type">POINT</span></a></span><span>
</span><span id="line-150"></span><span id="getBrushOrgEx"><span class="annot"><span class="annottext">getBrushOrgEx :: HDC -&gt; IO POINT
</span><a href="Graphics.Win32.GDI.HDC.html#getBrushOrgEx"><span class="hs-identifier hs-var hs-var">getBrushOrgEx</span></a></span></span><span> </span><span id="local-6989586621679109582"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109582"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-151"></span><span>  </span><span class="annot"><span class="annottext">(Ptr POINT -&gt; IO POINT) -&gt; IO POINT
forall a. (Ptr POINT -&gt; IO a) -&gt; IO a
</span><a href="Graphics.Win32.GDI.Types.html#allocaPOINT"><span class="hs-identifier hs-var">allocaPOINT</span></a></span><span> </span><span class="annot"><span class="annottext">((Ptr POINT -&gt; IO POINT) -&gt; IO POINT)
-&gt; (Ptr POINT -&gt; IO POINT) -&gt; IO POINT
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679109581"><span class="annot"><span class="annottext">Ptr POINT
</span><a href="#local-6989586621679109581"><span class="hs-identifier hs-var">pt</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-152"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO Bool -&gt; IO ()
</span><a href="System.Win32.Types.html#failIfFalse_"><span class="hs-identifier hs-var">failIfFalse_</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetBrushOrgEx&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Bool -&gt; IO ()) -&gt; IO Bool -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; Ptr POINT -&gt; IO Bool
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetBrushOrgEx"><span class="hs-identifier hs-var">c_GetBrushOrgEx</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109582"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr POINT
</span><a href="#local-6989586621679109581"><span class="hs-identifier hs-var">pt</span></a></span><span>
</span><span id="line-153"></span><span>  </span><span class="annot"><span class="annottext">Ptr POINT -&gt; IO POINT
</span><a href="Graphics.Win32.GDI.Types.html#peekPOINT"><span class="hs-identifier hs-var">peekPOINT</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr POINT
</span><a href="#local-6989586621679109581"><span class="hs-identifier hs-var">pt</span></a></span><span>
</span><span id="line-154"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetBrushOrgEx&quot;</span><span>
</span><span id="line-155"></span><span>  </span><span id="c_GetBrushOrgEx"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetBrushOrgEx"><span class="hs-identifier hs-var">c_GetBrushOrgEx</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#POINT"><span class="hs-identifier hs-type">POINT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#setTextAlign"><span class="hs-identifier hs-type">setTextAlign</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#TextAlignment"><span class="hs-identifier hs-type">TextAlignment</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#TextAlignment"><span class="hs-identifier hs-type">TextAlignment</span></a></span><span>
</span><span id="line-158"></span><span id="setTextAlign"><span class="annot"><span class="annottext">setTextAlign :: HDC -&gt; Word32 -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#setTextAlign"><span class="hs-identifier hs-var hs-var">setTextAlign</span></a></span></span><span> </span><span id="local-6989586621679109577"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109577"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109576"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679109576"><span class="hs-identifier hs-var">align</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-159"></span><span>  </span><span class="annot"><span class="annottext">(Word32 -&gt; Bool) -&gt; String -&gt; IO Word32 -&gt; IO Word32
forall a. (a -&gt; Bool) -&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIf"><span class="hs-identifier hs-var">failIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Word32
forall a. Num a =&gt; a
</span><a href="Graphics.Win32.GDI.Types.html#gDI_ERROR"><span class="hs-identifier hs-var">gDI_ERROR</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SetTextAlign&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Word32 -&gt; IO Word32) -&gt; IO Word32 -&gt; IO Word32
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; Word32 -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#c_SetTextAlign"><span class="hs-identifier hs-var">c_SetTextAlign</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109577"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679109576"><span class="hs-identifier hs-var">align</span></a></span><span>
</span><span id="line-160"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SetTextAlign&quot;</span><span>
</span><span id="line-161"></span><span>  </span><span id="c_SetTextAlign"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SetTextAlign"><span class="hs-identifier hs-var">c_SetTextAlign</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#TextAlignment"><span class="hs-identifier hs-type">TextAlignment</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#TextAlignment"><span class="hs-identifier hs-type">TextAlignment</span></a></span><span>
</span><span id="line-162"></span><span>
</span><span id="line-163"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getTextAlign"><span class="hs-identifier hs-type">getTextAlign</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#TextAlignment"><span class="hs-identifier hs-type">TextAlignment</span></a></span><span>
</span><span id="line-164"></span><span id="getTextAlign"><span class="annot"><span class="annottext">getTextAlign :: HDC -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#getTextAlign"><span class="hs-identifier hs-var hs-var">getTextAlign</span></a></span></span><span> </span><span id="local-6989586621679109572"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109572"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-165"></span><span>  </span><span class="annot"><span class="annottext">(Word32 -&gt; Bool) -&gt; String -&gt; IO Word32 -&gt; IO Word32
forall a. (a -&gt; Bool) -&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIf"><span class="hs-identifier hs-var">failIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Word32
forall a. Num a =&gt; a
</span><a href="Graphics.Win32.GDI.Types.html#gDI_ERROR"><span class="hs-identifier hs-var">gDI_ERROR</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetTextAlign&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Word32 -&gt; IO Word32) -&gt; IO Word32 -&gt; IO Word32
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; IO Word32
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetTextAlign"><span class="hs-identifier hs-var">c_GetTextAlign</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109572"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-166"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetTextAlign&quot;</span><span>
</span><span id="line-167"></span><span>  </span><span id="c_GetTextAlign"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetTextAlign"><span class="hs-identifier hs-var">c_GetTextAlign</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#TextAlignment"><span class="hs-identifier hs-type">TextAlignment</span></a></span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#setTextCharacterExtra"><span class="hs-identifier hs-type">setTextCharacterExtra</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-170"></span><span id="setTextCharacterExtra"><span class="annot"><span class="annottext">setTextCharacterExtra :: HDC -&gt; Int -&gt; IO Int
</span><a href="Graphics.Win32.GDI.HDC.html#setTextCharacterExtra"><span class="hs-identifier hs-var hs-var">setTextCharacterExtra</span></a></span></span><span> </span><span id="local-6989586621679109569"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109569"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109568"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109568"><span class="hs-identifier hs-var">extra</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-171"></span><span>  </span><span class="hs-comment">-- See Note [Overflow checking and fromIntegral]</span><span>
</span><span id="line-172"></span><span>  </span><span class="annot"><span class="annottext">(Int -&gt; Bool) -&gt; String -&gt; IO Int -&gt; IO Int
forall a. (a -&gt; Bool) -&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIf"><span class="hs-identifier hs-var">failIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x80000000</span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SetTextCharacterExtra&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Int -&gt; IO Int) -&gt; IO Int -&gt; IO Int
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-173"></span><span>    </span><span class="annot"><span class="annottext">HDC -&gt; Int -&gt; IO Int
</span><a href="Graphics.Win32.GDI.HDC.html#c_SetTextCharacterExtra"><span class="hs-identifier hs-var">c_SetTextCharacterExtra</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109569"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109568"><span class="hs-identifier hs-var">extra</span></a></span><span>
</span><span id="line-174"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SetTextCharacterExtra&quot;</span><span>
</span><span id="line-175"></span><span>  </span><span id="c_SetTextCharacterExtra"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SetTextCharacterExtra"><span class="hs-identifier hs-var">c_SetTextCharacterExtra</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-176"></span><span>
</span><span id="line-177"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getTextCharacterExtra"><span class="hs-identifier hs-type">getTextCharacterExtra</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-178"></span><span id="getTextCharacterExtra"><span class="annot"><span class="annottext">getTextCharacterExtra :: HDC -&gt; IO Int
</span><a href="Graphics.Win32.GDI.HDC.html#getTextCharacterExtra"><span class="hs-identifier hs-var hs-var">getTextCharacterExtra</span></a></span></span><span> </span><span id="local-6989586621679109565"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109565"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-179"></span><span>  </span><span class="hs-comment">-- See Note [Overflow checking and fromIntegral]</span><span>
</span><span id="line-180"></span><span>  </span><span class="annot"><span class="annottext">(Int -&gt; Bool) -&gt; String -&gt; IO Int -&gt; IO Int
forall a. (a -&gt; Bool) -&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIf"><span class="hs-identifier hs-var">failIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x80000000</span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetTextCharacterExtra&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Int -&gt; IO Int) -&gt; IO Int -&gt; IO Int
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; IO Int
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetTextCharacterExtra"><span class="hs-identifier hs-var">c_GetTextCharacterExtra</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109565"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-181"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetTextCharacterExtra&quot;</span><span>
</span><span id="line-182"></span><span>  </span><span id="c_GetTextCharacterExtra"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetTextCharacterExtra"><span class="hs-identifier hs-var">c_GetTextCharacterExtra</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getMiterLimit"><span class="hs-identifier hs-type">getMiterLimit</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Float</span></span><span>
</span><span id="line-185"></span><span id="getMiterLimit"><span class="annot"><span class="annottext">getMiterLimit :: HDC -&gt; IO FLOAT
</span><a href="Graphics.Win32.GDI.HDC.html#getMiterLimit"><span class="hs-identifier hs-var hs-var">getMiterLimit</span></a></span></span><span> </span><span id="local-6989586621679109562"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109562"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-186"></span><span>  </span><span class="annot"><span class="annottext">(Ptr FLOAT -&gt; IO FLOAT) -&gt; IO FLOAT
forall a b. Storable a =&gt; (Ptr a -&gt; IO b) -&gt; IO b
</span><a href="../../base/src/Foreign.Marshal.Alloc.html#alloca"><span class="hs-identifier hs-var">alloca</span></a></span><span> </span><span class="annot"><span class="annottext">((Ptr FLOAT -&gt; IO FLOAT) -&gt; IO FLOAT)
-&gt; (Ptr FLOAT -&gt; IO FLOAT) -&gt; IO FLOAT
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679109560"><span class="annot"><span class="annottext">Ptr FLOAT
</span><a href="#local-6989586621679109560"><span class="hs-identifier hs-var">p_res</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-187"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO Bool -&gt; IO ()
</span><a href="System.Win32.Types.html#failIfFalse_"><span class="hs-identifier hs-var">failIfFalse_</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetMiterLimit&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Bool -&gt; IO ()) -&gt; IO Bool -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; Ptr FLOAT -&gt; IO Bool
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetMiterLimit"><span class="hs-identifier hs-var">c_GetMiterLimit</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109562"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr FLOAT
</span><a href="#local-6989586621679109560"><span class="hs-identifier hs-var">p_res</span></a></span><span>
</span><span id="line-188"></span><span>  </span><span class="annot"><span class="annottext">Ptr FLOAT -&gt; IO FLOAT
forall a. Storable a =&gt; Ptr a -&gt; IO a
</span><a href="../../base/src/Foreign.Storable.html#peek"><span class="hs-identifier hs-var">peek</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr FLOAT
</span><a href="#local-6989586621679109560"><span class="hs-identifier hs-var">p_res</span></a></span><span>
</span><span id="line-189"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetMiterLimit&quot;</span><span>
</span><span id="line-190"></span><span>  </span><span id="c_GetMiterLimit"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetMiterLimit"><span class="hs-identifier hs-var">c_GetMiterLimit</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="System.Win32.Types.html#FLOAT"><span class="hs-identifier hs-type">FLOAT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-191"></span><span>
</span><span id="line-192"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#setMiterLimit"><span class="hs-identifier hs-type">setMiterLimit</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Float</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Float</span></span><span>
</span><span id="line-193"></span><span id="setMiterLimit"><span class="annot"><span class="annottext">setMiterLimit :: HDC -&gt; FLOAT -&gt; IO FLOAT
</span><a href="Graphics.Win32.GDI.HDC.html#setMiterLimit"><span class="hs-identifier hs-var hs-var">setMiterLimit</span></a></span></span><span> </span><span id="local-6989586621679109556"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109556"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109555"><span class="annot"><span class="annottext">FLOAT
</span><a href="#local-6989586621679109555"><span class="hs-identifier hs-var">new_limit</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-194"></span><span>  </span><span class="annot"><span class="annottext">(Ptr FLOAT -&gt; IO FLOAT) -&gt; IO FLOAT
forall a b. Storable a =&gt; (Ptr a -&gt; IO b) -&gt; IO b
</span><a href="../../base/src/Foreign.Marshal.Alloc.html#alloca"><span class="hs-identifier hs-var">alloca</span></a></span><span> </span><span class="annot"><span class="annottext">((Ptr FLOAT -&gt; IO FLOAT) -&gt; IO FLOAT)
-&gt; (Ptr FLOAT -&gt; IO FLOAT) -&gt; IO FLOAT
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679109554"><span class="annot"><span class="annottext">Ptr FLOAT
</span><a href="#local-6989586621679109554"><span class="hs-identifier hs-var">p_old_limit</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-195"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO Bool -&gt; IO ()
</span><a href="System.Win32.Types.html#failIfFalse_"><span class="hs-identifier hs-var">failIfFalse_</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SetMiterLimit&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Bool -&gt; IO ()) -&gt; IO Bool -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; FLOAT -&gt; Ptr FLOAT -&gt; IO Bool
</span><a href="Graphics.Win32.GDI.HDC.html#c_SetMiterLimit"><span class="hs-identifier hs-var">c_SetMiterLimit</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109556"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">FLOAT
</span><a href="#local-6989586621679109555"><span class="hs-identifier hs-var">new_limit</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr FLOAT
</span><a href="#local-6989586621679109554"><span class="hs-identifier hs-var">p_old_limit</span></a></span><span>
</span><span id="line-196"></span><span>  </span><span class="annot"><span class="annottext">Ptr FLOAT -&gt; IO FLOAT
forall a. Storable a =&gt; Ptr a -&gt; IO a
</span><a href="../../base/src/Foreign.Storable.html#peek"><span class="hs-identifier hs-var">peek</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr FLOAT
</span><a href="#local-6989586621679109554"><span class="hs-identifier hs-var">p_old_limit</span></a></span><span>
</span><span id="line-197"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SetMiterLimit&quot;</span><span>
</span><span id="line-198"></span><span>  </span><span id="c_SetMiterLimit"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SetMiterLimit"><span class="hs-identifier hs-var">c_SetMiterLimit</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Win32.Types.html#FLOAT"><span class="hs-identifier hs-type">FLOAT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="System.Win32.Types.html#FLOAT"><span class="hs-identifier hs-type">FLOAT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-199"></span><span>
</span><span id="line-200"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-201"></span><span>
</span><span id="line-202"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#saveDC"><span class="hs-identifier hs-type">saveDC</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-203"></span><span id="saveDC"><span class="annot"><span class="annottext">saveDC :: HDC -&gt; IO Int
</span><a href="Graphics.Win32.GDI.HDC.html#saveDC"><span class="hs-identifier hs-var hs-var">saveDC</span></a></span></span><span> </span><span id="local-6989586621679109551"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109551"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-204"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO Int -&gt; IO Int
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SaveDC&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Int -&gt; IO Int) -&gt; IO Int -&gt; IO Int
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; IO Int
</span><a href="Graphics.Win32.GDI.HDC.html#c_SaveDC"><span class="hs-identifier hs-var">c_SaveDC</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109551"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-205"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SaveDC&quot;</span><span>
</span><span id="line-206"></span><span>  </span><span id="c_SaveDC"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SaveDC"><span class="hs-identifier hs-var">c_SaveDC</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-207"></span><span>
</span><span id="line-208"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#restoreDC"><span class="hs-identifier hs-type">restoreDC</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-209"></span><span id="restoreDC"><span class="annot"><span class="annottext">restoreDC :: HDC -&gt; Int -&gt; IO ()
</span><a href="Graphics.Win32.GDI.HDC.html#restoreDC"><span class="hs-identifier hs-var hs-var">restoreDC</span></a></span></span><span> </span><span id="local-6989586621679109548"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109548"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109547"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109547"><span class="hs-identifier hs-var">saved</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-210"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO Bool -&gt; IO ()
</span><a href="System.Win32.Types.html#failIfFalse_"><span class="hs-identifier hs-var">failIfFalse_</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RestoreDC&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Bool -&gt; IO ()) -&gt; IO Bool -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; Int -&gt; IO Bool
</span><a href="Graphics.Win32.GDI.HDC.html#c_RestoreDC"><span class="hs-identifier hs-var">c_RestoreDC</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109548"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109547"><span class="hs-identifier hs-var">saved</span></a></span><span>
</span><span id="line-211"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h RestoreDC&quot;</span><span>
</span><span id="line-212"></span><span>  </span><span id="c_RestoreDC"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_RestoreDC"><span class="hs-identifier hs-var">c_RestoreDC</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-213"></span><span>
</span><span id="line-214"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-215"></span><span>
</span><span id="line-216"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getCurrentBitmap"><span class="hs-identifier hs-type">getCurrentBitmap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HBITMAP"><span class="hs-identifier hs-type">HBITMAP</span></a></span><span>
</span><span id="line-217"></span><span id="getCurrentBitmap"><span class="annot"><span class="annottext">getCurrentBitmap :: HDC -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#getCurrentBitmap"><span class="hs-identifier hs-var hs-var">getCurrentBitmap</span></a></span></span><span> </span><span id="local-6989586621679109543"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109543"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-218"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO HDC -&gt; IO HDC
forall a. String -&gt; IO (Ptr a) -&gt; IO (Ptr a)
</span><a href="System.Win32.Types.html#failIfNull"><span class="hs-identifier hs-var">failIfNull</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetCurrentBitmap&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO HDC -&gt; IO HDC) -&gt; IO HDC -&gt; IO HDC
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; Word32 -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetCurrentBitmap"><span class="hs-identifier hs-var">c_GetCurrentBitmap</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109543"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="Graphics.Win32.GDI.Types.html#oBJ_BITMAP"><span class="hs-identifier hs-var">oBJ_BITMAP</span></a></span><span>
</span><span id="line-219"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetCurrentObject&quot;</span><span>
</span><span id="line-220"></span><span>  </span><span id="c_GetCurrentBitmap"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetCurrentBitmap"><span class="hs-identifier hs-var">c_GetCurrentBitmap</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Win32.Types.html#UINT"><span class="hs-identifier hs-type">UINT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>  </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HBITMAP"><span class="hs-identifier hs-type">HBITMAP</span></a></span><span>
</span><span id="line-221"></span><span>
</span><span id="line-222"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getCurrentBrush"><span class="hs-identifier hs-type">getCurrentBrush</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HBRUSH"><span class="hs-identifier hs-type">HBRUSH</span></a></span><span>
</span><span id="line-223"></span><span id="getCurrentBrush"><span class="annot"><span class="annottext">getCurrentBrush :: HDC -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#getCurrentBrush"><span class="hs-identifier hs-var hs-var">getCurrentBrush</span></a></span></span><span> </span><span id="local-6989586621679109536"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109536"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-224"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO HDC -&gt; IO HDC
forall a. String -&gt; IO (Ptr a) -&gt; IO (Ptr a)
</span><a href="System.Win32.Types.html#failIfNull"><span class="hs-identifier hs-var">failIfNull</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetCurrentBrush&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO HDC -&gt; IO HDC) -&gt; IO HDC -&gt; IO HDC
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; Word32 -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetCurrentBrush"><span class="hs-identifier hs-var">c_GetCurrentBrush</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109536"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="Graphics.Win32.GDI.Types.html#oBJ_BRUSH"><span class="hs-identifier hs-var">oBJ_BRUSH</span></a></span><span>
</span><span id="line-225"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetCurrentObject&quot;</span><span>
</span><span id="line-226"></span><span>  </span><span id="c_GetCurrentBrush"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetCurrentBrush"><span class="hs-identifier hs-var">c_GetCurrentBrush</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Win32.Types.html#UINT"><span class="hs-identifier hs-type">UINT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>   </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HBRUSH"><span class="hs-identifier hs-type">HBRUSH</span></a></span><span>
</span><span id="line-227"></span><span>
</span><span id="line-228"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getCurrentFont"><span class="hs-identifier hs-type">getCurrentFont</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HFONT"><span class="hs-identifier hs-type">HFONT</span></a></span><span>
</span><span id="line-229"></span><span id="getCurrentFont"><span class="annot"><span class="annottext">getCurrentFont :: HDC -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#getCurrentFont"><span class="hs-identifier hs-var hs-var">getCurrentFont</span></a></span></span><span> </span><span id="local-6989586621679109531"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109531"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-230"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO HDC -&gt; IO HDC
forall a. String -&gt; IO (Ptr a) -&gt; IO (Ptr a)
</span><a href="System.Win32.Types.html#failIfNull"><span class="hs-identifier hs-var">failIfNull</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetCurrentFont&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO HDC -&gt; IO HDC) -&gt; IO HDC -&gt; IO HDC
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; Word32 -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetCurrentFont"><span class="hs-identifier hs-var">c_GetCurrentFont</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109531"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="Graphics.Win32.GDI.Types.html#oBJ_FONT"><span class="hs-identifier hs-var">oBJ_FONT</span></a></span><span>
</span><span id="line-231"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetCurrentObject&quot;</span><span>
</span><span id="line-232"></span><span>  </span><span id="c_GetCurrentFont"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetCurrentFont"><span class="hs-identifier hs-var">c_GetCurrentFont</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Win32.Types.html#UINT"><span class="hs-identifier hs-type">UINT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>    </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HFONT"><span class="hs-identifier hs-type">HFONT</span></a></span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getCurrentPalette"><span class="hs-identifier hs-type">getCurrentPalette</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HPALETTE"><span class="hs-identifier hs-type">HPALETTE</span></a></span><span>
</span><span id="line-235"></span><span id="getCurrentPalette"><span class="annot"><span class="annottext">getCurrentPalette :: HDC -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#getCurrentPalette"><span class="hs-identifier hs-var hs-var">getCurrentPalette</span></a></span></span><span> </span><span id="local-6989586621679109526"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109526"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-236"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO HDC -&gt; IO HDC
forall a. String -&gt; IO (Ptr a) -&gt; IO (Ptr a)
</span><a href="System.Win32.Types.html#failIfNull"><span class="hs-identifier hs-var">failIfNull</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetCurrentPalette&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO HDC -&gt; IO HDC) -&gt; IO HDC -&gt; IO HDC
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; Word32 -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetCurrentPalette"><span class="hs-identifier hs-var">c_GetCurrentPalette</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109526"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="Graphics.Win32.GDI.Types.html#oBJ_PAL"><span class="hs-identifier hs-var">oBJ_PAL</span></a></span><span>
</span><span id="line-237"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetCurrentObject&quot;</span><span>
</span><span id="line-238"></span><span>  </span><span id="c_GetCurrentPalette"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetCurrentPalette"><span class="hs-identifier hs-var">c_GetCurrentPalette</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Win32.Types.html#UINT"><span class="hs-identifier hs-type">UINT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>     </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HPALETTE"><span class="hs-identifier hs-type">HPALETTE</span></a></span><span>
</span><span id="line-239"></span><span>
</span><span id="line-240"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#getCurrentPen"><span class="hs-identifier hs-type">getCurrentPen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HPEN"><span class="hs-identifier hs-type">HPEN</span></a></span><span>
</span><span id="line-241"></span><span id="getCurrentPen"><span class="annot"><span class="annottext">getCurrentPen :: HDC -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#getCurrentPen"><span class="hs-identifier hs-var hs-var">getCurrentPen</span></a></span></span><span> </span><span id="local-6989586621679109521"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109521"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-242"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO HDC -&gt; IO HDC
forall a. String -&gt; IO (Ptr a) -&gt; IO (Ptr a)
</span><a href="System.Win32.Types.html#failIfNull"><span class="hs-identifier hs-var">failIfNull</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GetCurrentPen&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO HDC -&gt; IO HDC) -&gt; IO HDC -&gt; IO HDC
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; Word32 -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#c_GetCurrentPen"><span class="hs-identifier hs-var">c_GetCurrentPen</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109521"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="Graphics.Win32.GDI.Types.html#oBJ_PEN"><span class="hs-identifier hs-var">oBJ_PEN</span></a></span><span>
</span><span id="line-243"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h GetCurrentObject&quot;</span><span>
</span><span id="line-244"></span><span>  </span><span id="c_GetCurrentPen"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_GetCurrentPen"><span class="hs-identifier hs-var">c_GetCurrentPen</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Win32.Types.html#UINT"><span class="hs-identifier hs-type">UINT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>     </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HPEN"><span class="hs-identifier hs-type">HPEN</span></a></span><span>
</span><span id="line-245"></span><span>
</span><span id="line-246"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#selectBitmap"><span class="hs-identifier hs-type">selectBitmap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HBITMAP"><span class="hs-identifier hs-type">HBITMAP</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HBITMAP"><span class="hs-identifier hs-type">HBITMAP</span></a></span><span>
</span><span id="line-247"></span><span id="selectBitmap"><span class="annot"><span class="annottext">selectBitmap :: HDC -&gt; HDC -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#selectBitmap"><span class="hs-identifier hs-var hs-var">selectBitmap</span></a></span></span><span> </span><span id="local-6989586621679109517"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109517"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109516"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109516"><span class="hs-identifier hs-var">bitmap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-248"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO HDC -&gt; IO HDC
forall a. String -&gt; IO (Ptr a) -&gt; IO (Ptr a)
</span><a href="System.Win32.Types.html#failIfNull"><span class="hs-identifier hs-var">failIfNull</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SelectBitmap&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO HDC -&gt; IO HDC) -&gt; IO HDC -&gt; IO HDC
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; HDC -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#c_SelectBitmap"><span class="hs-identifier hs-var">c_SelectBitmap</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109517"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109516"><span class="hs-identifier hs-var">bitmap</span></a></span><span>
</span><span id="line-249"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SelectObject&quot;</span><span>
</span><span id="line-250"></span><span>  </span><span id="c_SelectBitmap"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SelectBitmap"><span class="hs-identifier hs-var">c_SelectBitmap</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>   </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HBITMAP"><span class="hs-identifier hs-type">HBITMAP</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>   </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HBITMAP"><span class="hs-identifier hs-type">HBITMAP</span></a></span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#selectBrush"><span class="hs-identifier hs-type">selectBrush</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HBRUSH"><span class="hs-identifier hs-type">HBRUSH</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HBRUSH"><span class="hs-identifier hs-type">HBRUSH</span></a></span><span>
</span><span id="line-253"></span><span id="selectBrush"><span class="annot"><span class="annottext">selectBrush :: HDC -&gt; HDC -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#selectBrush"><span class="hs-identifier hs-var hs-var">selectBrush</span></a></span></span><span> </span><span id="local-6989586621679109513"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109513"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109512"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109512"><span class="hs-identifier hs-var">brush</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-254"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO HDC -&gt; IO HDC
forall a. String -&gt; IO (Ptr a) -&gt; IO (Ptr a)
</span><a href="System.Win32.Types.html#failIfNull"><span class="hs-identifier hs-var">failIfNull</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SelectBrush&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO HDC -&gt; IO HDC) -&gt; IO HDC -&gt; IO HDC
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; HDC -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#c_SelectBrush"><span class="hs-identifier hs-var">c_SelectBrush</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109513"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109512"><span class="hs-identifier hs-var">brush</span></a></span><span>
</span><span id="line-255"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SelectObject&quot;</span><span>
</span><span id="line-256"></span><span>  </span><span id="c_SelectBrush"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SelectBrush"><span class="hs-identifier hs-var">c_SelectBrush</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>    </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HBRUSH"><span class="hs-identifier hs-type">HBRUSH</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>    </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HBRUSH"><span class="hs-identifier hs-type">HBRUSH</span></a></span><span>
</span><span id="line-257"></span><span>
</span><span id="line-258"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#selectFont"><span class="hs-identifier hs-type">selectFont</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HFONT"><span class="hs-identifier hs-type">HFONT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HFONT"><span class="hs-identifier hs-type">HFONT</span></a></span><span>
</span><span id="line-259"></span><span id="selectFont"><span class="annot"><span class="annottext">selectFont :: HDC -&gt; HDC -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#selectFont"><span class="hs-identifier hs-var hs-var">selectFont</span></a></span></span><span> </span><span id="local-6989586621679109509"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109509"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109508"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109508"><span class="hs-identifier hs-var">font</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-260"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO HDC -&gt; IO HDC
forall a. String -&gt; IO (Ptr a) -&gt; IO (Ptr a)
</span><a href="System.Win32.Types.html#failIfNull"><span class="hs-identifier hs-var">failIfNull</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SelectFont&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO HDC -&gt; IO HDC) -&gt; IO HDC -&gt; IO HDC
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; HDC -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#c_SelectFont"><span class="hs-identifier hs-var">c_SelectFont</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109509"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109508"><span class="hs-identifier hs-var">font</span></a></span><span>
</span><span id="line-261"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SelectObject&quot;</span><span>
</span><span id="line-262"></span><span>  </span><span id="c_SelectFont"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SelectFont"><span class="hs-identifier hs-var">c_SelectFont</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>     </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HFONT"><span class="hs-identifier hs-type">HFONT</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>     </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HFONT"><span class="hs-identifier hs-type">HFONT</span></a></span><span>
</span><span id="line-263"></span><span>
</span><span id="line-264"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#selectPen"><span class="hs-identifier hs-type">selectPen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HPEN"><span class="hs-identifier hs-type">HPEN</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HPEN"><span class="hs-identifier hs-type">HPEN</span></a></span><span>
</span><span id="line-265"></span><span id="selectPen"><span class="annot"><span class="annottext">selectPen :: HDC -&gt; HDC -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#selectPen"><span class="hs-identifier hs-var hs-var">selectPen</span></a></span></span><span> </span><span id="local-6989586621679109505"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109505"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109504"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109504"><span class="hs-identifier hs-var">pen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-266"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO HDC -&gt; IO HDC
forall a. String -&gt; IO (Ptr a) -&gt; IO (Ptr a)
</span><a href="System.Win32.Types.html#failIfNull"><span class="hs-identifier hs-var">failIfNull</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SelectPen&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO HDC -&gt; IO HDC) -&gt; IO HDC -&gt; IO HDC
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; HDC -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#c_SelectPen"><span class="hs-identifier hs-var">c_SelectPen</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109505"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109504"><span class="hs-identifier hs-var">pen</span></a></span><span>
</span><span id="line-267"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SelectObject&quot;</span><span>
</span><span id="line-268"></span><span>  </span><span id="c_SelectPen"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SelectPen"><span class="hs-identifier hs-var">c_SelectPen</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>      </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HPEN"><span class="hs-identifier hs-type">HPEN</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>      </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HPEN"><span class="hs-identifier hs-type">HPEN</span></a></span><span>
</span><span id="line-269"></span><span>
</span><span id="line-270"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-271"></span><span class="hs-comment">--</span><span>
</span><span id="line-272"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-273"></span><span>
</span><span id="line-274"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#selectPalette"><span class="hs-identifier hs-type">selectPalette</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HPALETTE"><span class="hs-identifier hs-type">HPALETTE</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HPALETTE"><span class="hs-identifier hs-type">HPALETTE</span></a></span><span>
</span><span id="line-275"></span><span id="selectPalette"><span class="annot"><span class="annottext">selectPalette :: HDC -&gt; HDC -&gt; Bool -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#selectPalette"><span class="hs-identifier hs-var hs-var">selectPalette</span></a></span></span><span> </span><span id="local-6989586621679109501"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109501"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109500"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109500"><span class="hs-identifier hs-var">palette</span></a></span></span><span> </span><span id="local-6989586621679109499"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679109499"><span class="hs-identifier hs-var">force_bg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-276"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO HDC -&gt; IO HDC
forall a. String -&gt; IO (Ptr a) -&gt; IO (Ptr a)
</span><a href="System.Win32.Types.html#failIfNull"><span class="hs-identifier hs-var">failIfNull</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SelectPalette&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO HDC -&gt; IO HDC) -&gt; IO HDC -&gt; IO HDC
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; HDC -&gt; Bool -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#c_SelectPalette"><span class="hs-identifier hs-var">c_SelectPalette</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109501"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109500"><span class="hs-identifier hs-var">palette</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679109499"><span class="hs-identifier hs-var">force_bg</span></a></span><span>
</span><span id="line-277"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SelectPalette&quot;</span><span>
</span><span id="line-278"></span><span>  </span><span id="c_SelectPalette"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SelectPalette"><span class="hs-identifier hs-var">c_SelectPalette</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HPALETTE"><span class="hs-identifier hs-type">HPALETTE</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HPALETTE"><span class="hs-identifier hs-type">HPALETTE</span></a></span><span>
</span><span id="line-279"></span><span>
</span><span id="line-280"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#selectRgn"><span class="hs-identifier hs-type">selectRgn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HRGN"><span class="hs-identifier hs-type">HRGN</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#RegionType"><span class="hs-identifier hs-type">RegionType</span></a></span><span>
</span><span id="line-281"></span><span id="selectRgn"><span class="annot"><span class="annottext">selectRgn :: HDC -&gt; HRGN -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#selectRgn"><span class="hs-identifier hs-var hs-var">selectRgn</span></a></span></span><span> </span><span id="local-6989586621679109496"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109496"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109495"><span class="annot"><span class="annottext">HRGN
</span><a href="#local-6989586621679109495"><span class="hs-identifier hs-var">rgn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-282"></span><span>  </span><span class="annot"><span class="annottext">HRGN -&gt; (HDC -&gt; IO RegionType) -&gt; IO RegionType
forall a b. ForeignPtr a -&gt; (Ptr a -&gt; IO b) -&gt; IO b
</span><a href="../../base/src/GHC.ForeignPtr.html#withForeignPtr"><span class="hs-identifier hs-var">withForeignPtr</span></a></span><span> </span><span class="annot"><span class="annottext">HRGN
</span><a href="#local-6989586621679109495"><span class="hs-identifier hs-var">rgn</span></a></span><span> </span><span class="annot"><span class="annottext">((HDC -&gt; IO RegionType) -&gt; IO RegionType)
-&gt; (HDC -&gt; IO RegionType) -&gt; IO RegionType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679109493"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109493"><span class="hs-identifier hs-var">p_rgn</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-283"></span><span>  </span><span class="annot"><span class="annottext">(RegionType -&gt; Bool) -&gt; String -&gt; IO RegionType -&gt; IO RegionType
forall a. (a -&gt; Bool) -&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIf"><span class="hs-identifier hs-var">failIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegionType -&gt; RegionType -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">RegionType
forall a. Num a =&gt; a
</span><a href="Graphics.Win32.GDI.Types.html#gDI_ERROR"><span class="hs-identifier hs-var">gDI_ERROR</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SelectRgn&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO RegionType -&gt; IO RegionType) -&gt; IO RegionType -&gt; IO RegionType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; HDC -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#c_SelectRgn"><span class="hs-identifier hs-var">c_SelectRgn</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109496"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109493"><span class="hs-identifier hs-var">p_rgn</span></a></span><span>
</span><span id="line-284"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;windows.h SelectObjectInt&quot;</span></span><span>
</span><span id="line-285"></span><span>  </span><span id="c_SelectRgn"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SelectRgn"><span class="hs-identifier hs-var">c_SelectRgn</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#PRGN"><span class="hs-identifier hs-type">PRGN</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#RegionType"><span class="hs-identifier hs-type">RegionType</span></a></span><span>
</span><span id="line-286"></span><span class="hs-comment">-- avoid using SelectObject() at different types by calling our own</span><span>
</span><span id="line-287"></span><span class="hs-comment">-- wrapper.</span><span>
</span><span id="line-288"></span><span>
</span><span id="line-289"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#selectClipRgn"><span class="hs-identifier hs-type">selectClipRgn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HRGN"><span class="hs-identifier hs-type">HRGN</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#RegionType"><span class="hs-identifier hs-type">RegionType</span></a></span><span>
</span><span id="line-290"></span><span id="selectClipRgn"><span class="annot"><span class="annottext">selectClipRgn :: HDC -&gt; Maybe HRGN -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#selectClipRgn"><span class="hs-identifier hs-var hs-var">selectClipRgn</span></a></span></span><span> </span><span id="local-6989586621679109489"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109489"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109488"><span class="annot"><span class="annottext">Maybe HRGN
</span><a href="#local-6989586621679109488"><span class="hs-identifier hs-var">mb_rgn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-291"></span><span>  </span><span class="annot"><span class="annottext">(HRGN -&gt; (HDC -&gt; IO RegionType) -&gt; IO RegionType)
-&gt; Maybe HRGN -&gt; (HDC -&gt; IO RegionType) -&gt; IO RegionType
forall a b c.
(a -&gt; (Ptr b -&gt; IO c) -&gt; IO c)
-&gt; Maybe a -&gt; (Ptr b -&gt; IO c) -&gt; IO c
</span><a href="../../base/src/Foreign.Marshal.Utils.html#maybeWith"><span class="hs-identifier hs-var">maybeWith</span></a></span><span> </span><span class="annot"><span class="annottext">HRGN -&gt; (HDC -&gt; IO RegionType) -&gt; IO RegionType
forall a b. ForeignPtr a -&gt; (Ptr a -&gt; IO b) -&gt; IO b
</span><a href="../../base/src/GHC.ForeignPtr.html#withForeignPtr"><span class="hs-identifier hs-var">withForeignPtr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe HRGN
</span><a href="#local-6989586621679109488"><span class="hs-identifier hs-var">mb_rgn</span></a></span><span> </span><span class="annot"><span class="annottext">((HDC -&gt; IO RegionType) -&gt; IO RegionType)
-&gt; (HDC -&gt; IO RegionType) -&gt; IO RegionType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679109486"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109486"><span class="hs-identifier hs-var">p_rgn</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-292"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO RegionType -&gt; IO RegionType
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SelectClipRgn&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO RegionType -&gt; IO RegionType) -&gt; IO RegionType -&gt; IO RegionType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; HDC -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#c_SelectClipRgn"><span class="hs-identifier hs-var">c_SelectClipRgn</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109489"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109486"><span class="hs-identifier hs-var">p_rgn</span></a></span><span>
</span><span id="line-293"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SelectClipRgn&quot;</span><span>
</span><span id="line-294"></span><span>  </span><span id="c_SelectClipRgn"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SelectClipRgn"><span class="hs-identifier hs-var">c_SelectClipRgn</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#PRGN"><span class="hs-identifier hs-type">PRGN</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#RegionType"><span class="hs-identifier hs-type">RegionType</span></a></span><span>
</span><span id="line-295"></span><span>
</span><span id="line-296"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#extSelectClipRgn"><span class="hs-identifier hs-type">extSelectClipRgn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HRGN"><span class="hs-identifier hs-type">HRGN</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#ClippingMode"><span class="hs-identifier hs-type">ClippingMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#RegionType"><span class="hs-identifier hs-type">RegionType</span></a></span><span>
</span><span id="line-297"></span><span id="extSelectClipRgn"><span class="annot"><span class="annottext">extSelectClipRgn :: HDC -&gt; Maybe HRGN -&gt; RegionType -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#extSelectClipRgn"><span class="hs-identifier hs-var hs-var">extSelectClipRgn</span></a></span></span><span> </span><span id="local-6989586621679109482"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109482"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109481"><span class="annot"><span class="annottext">Maybe HRGN
</span><a href="#local-6989586621679109481"><span class="hs-identifier hs-var">mb_rgn</span></a></span></span><span> </span><span id="local-6989586621679109480"><span class="annot"><span class="annottext">RegionType
</span><a href="#local-6989586621679109480"><span class="hs-identifier hs-var">mode</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-298"></span><span>  </span><span class="annot"><span class="annottext">(HRGN -&gt; (HDC -&gt; IO RegionType) -&gt; IO RegionType)
-&gt; Maybe HRGN -&gt; (HDC -&gt; IO RegionType) -&gt; IO RegionType
forall a b c.
(a -&gt; (Ptr b -&gt; IO c) -&gt; IO c)
-&gt; Maybe a -&gt; (Ptr b -&gt; IO c) -&gt; IO c
</span><a href="../../base/src/Foreign.Marshal.Utils.html#maybeWith"><span class="hs-identifier hs-var">maybeWith</span></a></span><span> </span><span class="annot"><span class="annottext">HRGN -&gt; (HDC -&gt; IO RegionType) -&gt; IO RegionType
forall a b. ForeignPtr a -&gt; (Ptr a -&gt; IO b) -&gt; IO b
</span><a href="../../base/src/GHC.ForeignPtr.html#withForeignPtr"><span class="hs-identifier hs-var">withForeignPtr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe HRGN
</span><a href="#local-6989586621679109481"><span class="hs-identifier hs-var">mb_rgn</span></a></span><span> </span><span class="annot"><span class="annottext">((HDC -&gt; IO RegionType) -&gt; IO RegionType)
-&gt; (HDC -&gt; IO RegionType) -&gt; IO RegionType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679109479"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109479"><span class="hs-identifier hs-var">p_rgn</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-299"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO RegionType -&gt; IO RegionType
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ExtSelectClipRgn&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO RegionType -&gt; IO RegionType) -&gt; IO RegionType -&gt; IO RegionType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; HDC -&gt; RegionType -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#c_ExtSelectClipRgn"><span class="hs-identifier hs-var">c_ExtSelectClipRgn</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109482"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109479"><span class="hs-identifier hs-var">p_rgn</span></a></span><span> </span><span class="annot"><span class="annottext">RegionType
</span><a href="#local-6989586621679109480"><span class="hs-identifier hs-var">mode</span></a></span><span>
</span><span id="line-300"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h ExtSelectClipRgn&quot;</span><span>
</span><span id="line-301"></span><span>  </span><span id="c_ExtSelectClipRgn"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_ExtSelectClipRgn"><span class="hs-identifier hs-var">c_ExtSelectClipRgn</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#PRGN"><span class="hs-identifier hs-type">PRGN</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#ClippingMode"><span class="hs-identifier hs-type">ClippingMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#RegionType"><span class="hs-identifier hs-type">RegionType</span></a></span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#selectClipPath"><span class="hs-identifier hs-type">selectClipPath</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#ClippingMode"><span class="hs-identifier hs-type">ClippingMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#RegionType"><span class="hs-identifier hs-type">RegionType</span></a></span><span>
</span><span id="line-304"></span><span id="selectClipPath"><span class="annot"><span class="annottext">selectClipPath :: HDC -&gt; RegionType -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#selectClipPath"><span class="hs-identifier hs-var hs-var">selectClipPath</span></a></span></span><span> </span><span id="local-6989586621679109476"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109476"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109475"><span class="annot"><span class="annottext">RegionType
</span><a href="#local-6989586621679109475"><span class="hs-identifier hs-var">mode</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-305"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO RegionType -&gt; IO RegionType
forall a. (Eq a, Num a) =&gt; String -&gt; IO a -&gt; IO a
</span><a href="System.Win32.Types.html#failIfZero"><span class="hs-identifier hs-var">failIfZero</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SelectClipPath&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO RegionType -&gt; IO RegionType) -&gt; IO RegionType -&gt; IO RegionType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; RegionType -&gt; IO RegionType
</span><a href="Graphics.Win32.GDI.HDC.html#c_SelectClipPath"><span class="hs-identifier hs-var">c_SelectClipPath</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109476"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">RegionType
</span><a href="#local-6989586621679109475"><span class="hs-identifier hs-var">mode</span></a></span><span>
</span><span id="line-306"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h SelectClipPath&quot;</span><span>
</span><span id="line-307"></span><span>  </span><span id="c_SelectClipPath"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_SelectClipPath"><span class="hs-identifier hs-var">c_SelectClipPath</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#ClippingMode"><span class="hs-identifier hs-type">ClippingMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#RegionType"><span class="hs-identifier hs-type">RegionType</span></a></span><span>
</span><span id="line-308"></span><span>
</span><span id="line-309"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-310"></span><span class="hs-comment">-- Misc</span><span>
</span><span id="line-311"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-312"></span><span>
</span><span id="line-313"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#cancelDC"><span class="hs-identifier hs-type">cancelDC</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-314"></span><span id="cancelDC"><span class="annot"><span class="annottext">cancelDC :: HDC -&gt; IO ()
</span><a href="Graphics.Win32.GDI.HDC.html#cancelDC"><span class="hs-identifier hs-var hs-var">cancelDC</span></a></span></span><span> </span><span id="local-6989586621679109472"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109472"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-315"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO Bool -&gt; IO ()
</span><a href="System.Win32.Types.html#failIfFalse_"><span class="hs-identifier hs-var">failIfFalse_</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CancelDC&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Bool -&gt; IO ()) -&gt; IO Bool -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; IO Bool
</span><a href="Graphics.Win32.GDI.HDC.html#c_CancelDC"><span class="hs-identifier hs-var">c_CancelDC</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109472"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-316"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h CancelDC&quot;</span><span>
</span><span id="line-317"></span><span>  </span><span id="c_CancelDC"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_CancelDC"><span class="hs-identifier hs-var">c_CancelDC</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-318"></span><span>
</span><span id="line-319"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#createCompatibleDC"><span class="hs-identifier hs-type">createCompatibleDC</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span>
</span><span id="line-320"></span><span id="createCompatibleDC"><span class="annot"><span class="annottext">createCompatibleDC :: Maybe HDC -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#createCompatibleDC"><span class="hs-identifier hs-var hs-var">createCompatibleDC</span></a></span></span><span> </span><span id="local-6989586621679109469"><span class="annot"><span class="annottext">Maybe HDC
</span><a href="#local-6989586621679109469"><span class="hs-identifier hs-var">mb_dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-321"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO HDC -&gt; IO HDC
forall a. String -&gt; IO (Ptr a) -&gt; IO (Ptr a)
</span><a href="System.Win32.Types.html#failIfNull"><span class="hs-identifier hs-var">failIfNull</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CreateCompatibleDC&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO HDC -&gt; IO HDC) -&gt; IO HDC -&gt; IO HDC
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; IO HDC
</span><a href="Graphics.Win32.GDI.HDC.html#c_CreateCompatibleDC"><span class="hs-identifier hs-var">c_CreateCompatibleDC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe HDC -&gt; HDC
forall a. Maybe (Ptr a) -&gt; Ptr a
</span><a href="System.Win32.Types.html#maybePtr"><span class="hs-identifier hs-var">maybePtr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe HDC
</span><a href="#local-6989586621679109469"><span class="hs-identifier hs-var">mb_dc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-322"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h CreateCompatibleDC&quot;</span><span>
</span><span id="line-323"></span><span>  </span><span id="c_CreateCompatibleDC"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_CreateCompatibleDC"><span class="hs-identifier hs-var">c_CreateCompatibleDC</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span>
</span><span id="line-324"></span><span>
</span><span id="line-325"></span><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#deleteDC"><span class="hs-identifier hs-type">deleteDC</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-326"></span><span id="deleteDC"><span class="annot"><span class="annottext">deleteDC :: HDC -&gt; IO ()
</span><a href="Graphics.Win32.GDI.HDC.html#deleteDC"><span class="hs-identifier hs-var hs-var">deleteDC</span></a></span></span><span> </span><span id="local-6989586621679109465"><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109465"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-327"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO Bool -&gt; IO ()
</span><a href="System.Win32.Types.html#failIfFalse_"><span class="hs-identifier hs-var">failIfFalse_</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;DeleteDC&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Bool -&gt; IO ()) -&gt; IO Bool -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HDC -&gt; IO Bool
</span><a href="Graphics.Win32.GDI.HDC.html#c_DeleteDC"><span class="hs-identifier hs-var">c_DeleteDC</span></a></span><span> </span><span class="annot"><span class="annottext">HDC
</span><a href="#local-6989586621679109465"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-328"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h DeleteDC&quot;</span><span>
</span><span id="line-329"></span><span>  </span><span id="c_DeleteDC"><span class="annot"><a href="Graphics.Win32.GDI.HDC.html#c_DeleteDC"><span class="hs-identifier hs-var">c_DeleteDC</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-330"></span><span>
</span><span id="line-331"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-332"></span><span class="hs-comment">-- End</span><span>
</span><span id="line-333"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-334"></span></pre></body></html>